<table class='table table-striped table-hover'>
  <thead>
    <tr>
      <th>SHA</th>
      <th>Branch</th>
      <th>Built</th>
      <th>Launch</th>
      <th>&nbsp;</th>
    </tr>
  </thead>
  <tbody>
    {{#each build in builds}}
      <tr {{bind-attr class=':Build-list__build-row build.isLive:success'}}>

        <td>
          {{build.shortSha}}
        </td>

        <td>
          {{build.branch}}
        </td>

        <td>
          {{ago build.createdAt}}
        </td>

        <td>
          <a {{bind-attr href=build.location}}
            class="Build-list__launch-build">
            Launch {{fa-icon 'external-link'}}
          </a>
        </td>

        <td class='text-right'>
          {{#if build.isLive}}

            <button class="
              Build-list__control-live-button
              Build-list__control-live-button--live
              btn btn-success btn-xs disabled">
                Live
            </button>

          {{else}}

            <button {{action 'activate' build}} 
              class="
                Build-list__control-live-button
                Build-list__control-live-button--not-live
                btn btn-warning btn-xs">
                  Make live
            </button>

          {{/if}}
        </td>
      </tr>
    {{/each}}
  </tbody>
</table>
